package llk.views
{
	import com.controllers.Controller;
	import com.views.View;
	
	import llk.controllers.LlkController;

	public class LlkView extends View
	{
		private var _gameLayer:LLKGamLayerView;
		private var _uiLayer:LLKUILayerView;
		private var _ctrl:LlkController;
		private var _random:LLKRandomView
		public function LlkView()
		{
			super();
		}
		
		override public function initView(ctrl:Controller):void {
			_ctrl = ctrl as LlkController;
			init( );
		}
		
		/**初始化视图*/
		override public function createView( ):void {
			gameLayer.creatView( );
			randomView.createRandom()
		}
		
		/**初始化层对象 */
		private function init( ):void {
			addChild( gameLayer );
//			addChild( uiLayer );
			addChild(randomView);
		}
		
		public function get gameLayer( ):LLKGamLayerView {
			if( !_gameLayer ) _gameLayer = new LLKGamLayerView( _ctrl );
			return _gameLayer;
		}
		public function get uiLayer( ):LLKUILayerView {
			if( !_uiLayer ) _uiLayer = new LLKUILayerView( );
			return _uiLayer;
		}
		public function get randomView():LLKRandomView{
			if(!_random)_random = new LLKRandomView( _ctrl );
			return _random;
		}
		
		
		
	}
}